import Vue from 'vue'
import Router from 'vue-router'
import index from '@/pages/index/index'
import earlyWarning from '@/pages/earlyWarning/index'
import sale from '@/pages/sale/index'
import company from '@/pages/company/index'
import search from '@/pages/search/index'
import billing from '@/pages/Billing/index'
import billingl from '@/pages/Billingl/index'
import companyList from '@/pages/companyList/index'
import companysale from '@/pages/companyList/list'
import companygslist from '@/pages/companyList/gslist'

const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
} 
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'pageHome',
      component: index
    },
    {
      path: '/earlyWarning',
      name: 'earlyWarning',
      component: earlyWarning
    },
    {
      path: '/sale',
      name: 'sale ',
      component: sale
    },
    {
      path: '/company',
      name: 'company ',
      component: company
    },
    {
      path: '/search',
      name: 'search ',
      component: search
    },
    {
      path: '/billing',
      name: 'billing ',
      component: billing
    },
    {
      path: '/billingl',
      name: 'billingl ',
      component: billingl
    },
    {
      path: '/companyList',
      name: 'companyList ',
      component: companyList
    },
    {
      path: '/companysale',
      name: 'companysale ',
      component: companysale
    },
    {
      path: '/companygslist',
      name: 'companygslist ',
      component: companygslist
    }
  ]
})
